﻿<UserControl x:Class="Wormhole.UI.Application.Controls.Generic.UserInput"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="190" Width="200">

	<UserControl.Resources>
		<ControlTemplate x:Key="GlassButton" TargetType="{x:Type Button}">
			<ControlTemplate.Resources>
				<Storyboard x:Key="Storyboard1">
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
						<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
				<Storyboard x:Key="Storyboard2">
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
						<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
			</ControlTemplate.Resources>
			<Border BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
				<Border Background="#7F000000" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4" x:Name="border">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="0.491*"/>
							<RowDefinition Height="0.509*"/>
						</Grid.RowDefinitions>
						<Border Margin="0,0,0,0" CornerRadius="4,4,4,4" Grid.RowSpan="2" x:Name="Glow" Opacity="0">
							<Border.Background>
								<RadialGradientBrush>
									<RadialGradientBrush.RelativeTransform>
										<TransformGroup>
											<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.435" ScaleY="2.285"/>
											<SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
											<RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
											<TranslateTransform X="0.051" Y="0.336"/>
										</TransformGroup>
									</RadialGradientBrush.RelativeTransform>
									<GradientStop Color="#B22667B5" Offset="0"/>
									<GradientStop Color="#002667B5" Offset="0.978"/>
								</RadialGradientBrush>
							</Border.Background>
						</Border>
						<ContentPresenter HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Grid.RowSpan="2"/>
						<Border Margin="0,0,0,0" CornerRadius="4,4,0,0" x:Name="Shine">
							<Border.Background>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#99FFFFFF" Offset="0"/>
									<GradientStop Color="#33FFFFFF" Offset="0.996"/>
								</LinearGradientBrush>
							</Border.Background>
						</Border>
					</Grid>
				</Border>
			</Border>
			<ControlTemplate.Triggers>
				<Trigger Property="IsMouseOver" Value="True">
					<Trigger.EnterActions>
						<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
					</Trigger.EnterActions>
					<Trigger.ExitActions>
						<BeginStoryboard Storyboard="{StaticResource Storyboard2}" x:Name="Storyboard2_BeginStoryboard"/>
					</Trigger.ExitActions>
				</Trigger>
				<Trigger Property="IsPressed" Value="True">
					<Setter Property="Visibility" TargetName="Glow" Value="Hidden"/>
					<Setter Property="Opacity" TargetName="Shine" Value="0.4"/>
					<Setter Property="Background" TargetName="border" Value="#CC000000"/>
				</Trigger>
			</ControlTemplate.Triggers>
		</ControlTemplate>
	</UserControl.Resources>

	<Grid>
		<Border CornerRadius="10,10,10,10">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.49,0.98" StartPoint="0.49,-0.002">
					<GradientStop Color="#FFE6E6E6" Offset="0"/>
					<GradientStop Color="#FFB4B4B4" Offset="0.786"/>
				</LinearGradientBrush>
			</Border.Background>
			
			<Grid>
				<Label Name="lblTurn" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,10,0,0">Turn: 0</Label>
				<TextBlock  Name="lblMessage" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,30" TextWrapping="Wrap" TextAlignment="Center">Please select an action to perform.</TextBlock>

				<Grid Name="gridPass" Margin="0,0,0,10" VerticalAlignment="Bottom" HorizontalAlignment="Center" Visibility="Hidden">
					<Button Name="btnPass" Template="{DynamicResource GlassButton}" Content="Pass" Foreground="#FFFFFFFF" Height="25" Width="60" Click="Button_Click" />
				</Grid>

				<Grid  Margin="0,0,0,10" VerticalAlignment="Bottom" HorizontalAlignment="Center" Width="130" Name="gridYesNo" Visibility="Hidden">
					<Button Name="btnYes" Height="25" Width="60" HorizontalAlignment="Left" Template="{DynamicResource GlassButton}" Content="Yes" Foreground="#FFFFFFFF" Click="btnYes_Click" />
					<Button Name="btnNo" Height="25" Width="60" HorizontalAlignment="Right" Template="{DynamicResource GlassButton}" Content="No" Foreground="#FFFFFFFF" Click="btnNo_Click"/>
				</Grid>
			</Grid>
		</Border>
	</Grid>
</UserControl>
